rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
var notificationCallbacks = { getInterface: function(iid, instance) { if (iid.equals(Components.interfaces.nsIAuthPrompt)) { var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); return ww.getNewAuthPrompter(null); } Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE; return null; }, } Channel.notificationCallbacks = notificationCallbacks; | calendarManager.prototype.getRemoteCalendarText = function calMan_getRemoteCalendarText( Channel, onResponse, onError ){ var Listener = { onStreamComplete: function(loader, ctxt, status, resultLength, result) { window.setCursor( "default" ); var retval = false; result = String.fromCharCode.apply(this, result); //check to make sure its actually a calendar file, if not return. if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 ) { alert( "This doesn't appear to be a valid file. Here's what I got back from\n"+Channel.URI.spec+":\nResult:"+result ); } else { onResponse( result ); retval = true; } if( gNextSubNodeToRefresh ) gCalendarWindow.calendarManager.refreshAllRemoteCalendars(); return retval; } } var myInstance = Components.classes["@mozilla.org/network/stream-loader;1"].createInstance(Components.interfaces.nsIStreamLoader); dump( "init channel, \nChannel is "+Channel+"\nURL is "+Channel.URI.spec+"\n" ); window.setCursor( "wait" ); myInstance.init( Channel, Listener, null );} |
|
var ch = Channel.QueryInterface(Components.interfaces.nsIHttpChannel); if (!ch.requestSucceeded) { | var ch; try { ch = loader.request.QueryInterface(Components.interfaces.nsIHttpChannel); } catch(e) { } if (ch && !ch.requestSucceeded) { | calendarManager.prototype.getRemoteCalendarText = function calMan_getRemoteCalendarText( Channel, onResponse, onError ){ var Listener = { onStreamComplete: function(loader, ctxt, status, resultLength, result) { window.setCursor( "default" ); var retval = false; if( typeof( result ) != "string" ) //for 1.7 compatibility result = String.fromCharCode.apply(this, result); var ch = Channel.QueryInterface(Components.interfaces.nsIHttpChannel); if (!ch.requestSucceeded) { alert("Getting the calendar file failed.\nStatus code: "+ch.responseStatus+": "+ch.responseStatusText); } //check to make sure its actually a calendar file, if not return. else if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 ) { alert( "This doesn't appear to be a valid file. Here's what I got back from\n"+Channel.URI.spec+":\nResult:"+result ); } else { onResponse( result ); retval = true; } if( gNextSubNodeToRefresh ) gCalendarWindow.calendarManager.refreshAllRemoteCalendars(); return retval; } } var notificationCallbacks = { // nsIInterfaceRequestor interface getInterface: function(iid, instance) { if (iid.equals(Components.interfaces.nsIAuthPrompt)) { // use the window watcher service to get a nsIAuthPrompt impl var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); return ww.getNewAuthPrompter(null); } Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE; return null; } } Channel.notificationCallbacks = notificationCallbacks; var myInstance = Components.classes["@mozilla.org/network/stream-loader;1"].createInstance(Components.interfaces.nsIStreamLoader); dump( "init channel, \nChannel is "+Channel+"\nURL is "+Channel.URI.spec+"\n" ); window.setCursor( "wait" ); myInstance.init( Channel, Listener, null );} |
} else if (!Components.isSuccessCode(loader.request.status)) { alert("Getting the calendar file failed.\nStatus code: 0x"+loader.request.status.toString(16)); | calendarManager.prototype.getRemoteCalendarText = function calMan_getRemoteCalendarText( Channel, onResponse, onError ){ var Listener = { onStreamComplete: function(loader, ctxt, status, resultLength, result) { window.setCursor( "default" ); var retval = false; if( typeof( result ) != "string" ) //for 1.7 compatibility result = String.fromCharCode.apply(this, result); var ch = Channel.QueryInterface(Components.interfaces.nsIHttpChannel); if (!ch.requestSucceeded) { alert("Getting the calendar file failed.\nStatus code: "+ch.responseStatus+": "+ch.responseStatusText); } //check to make sure its actually a calendar file, if not return. else if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 ) { alert( "This doesn't appear to be a valid file. Here's what I got back from\n"+Channel.URI.spec+":\nResult:"+result ); } else { onResponse( result ); retval = true; } if( gNextSubNodeToRefresh ) gCalendarWindow.calendarManager.refreshAllRemoteCalendars(); return retval; } } var notificationCallbacks = { // nsIInterfaceRequestor interface getInterface: function(iid, instance) { if (iid.equals(Components.interfaces.nsIAuthPrompt)) { // use the window watcher service to get a nsIAuthPrompt impl var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); return ww.getNewAuthPrompter(null); } Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE; return null; } } Channel.notificationCallbacks = notificationCallbacks; var myInstance = Components.classes["@mozilla.org/network/stream-loader;1"].createInstance(Components.interfaces.nsIStreamLoader); dump( "init channel, \nChannel is "+Channel+"\nURL is "+Channel.URI.spec+"\n" ); window.setCursor( "wait" ); myInstance.init( Channel, Listener, null );} |
|
var retval = false; | calendarManager.prototype.getRemoteCalendarText = function calMan_getRemoteCalendarText( Channel, onResponse, onError ){ var Listener = { onStreamComplete: function(loader, ctxt, status, resultLength, result) { window.setCursor( "default" ); //check to make sure its actually a calendar file, if not return. if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 ) { alert( "This doesn't appear to be a valid file. Here's what I got back from\n"+Channel.URI.spec+":\nResult:"+result ); return false; } //if we have only one event, open the event dialog. var BeginEventText = "BEGIN:VEVENT"; var firstMatchLocation = result.indexOf( BeginEventText ); if( firstMatchLocation == -1 ) { alert( "There are no events in this file. Here's what I got from\n"+Channel.URI.spec+"\nResult: "+result ); return false; } else { onResponse( result ); } return true; } } var myInstance = Components.classes["@mozilla.org/network/stream-loader;1"].createInstance(Components.interfaces.nsIStreamLoader); dump( "init channel, \nChannel is "+Channel+"\nURL is "+Channel.URI.spec+"\n" ); window.setCursor( "wait" ); myInstance.init( Channel, Listener, null );} |
|
return false; | } else { var firstMatchLocation = result.indexOf( "BEGIN:VEVENT" ); if( firstMatchLocation == -1 ) { alert( "There are no events in this file. Here's what I got from\n"+Channel.URI.spec+"\nResult: "+result ); } else { onResponse( result ); retval = true; } | calendarManager.prototype.getRemoteCalendarText = function calMan_getRemoteCalendarText( Channel, onResponse, onError ){ var Listener = { onStreamComplete: function(loader, ctxt, status, resultLength, result) { window.setCursor( "default" ); //check to make sure its actually a calendar file, if not return. if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 ) { alert( "This doesn't appear to be a valid file. Here's what I got back from\n"+Channel.URI.spec+":\nResult:"+result ); return false; } //if we have only one event, open the event dialog. var BeginEventText = "BEGIN:VEVENT"; var firstMatchLocation = result.indexOf( BeginEventText ); if( firstMatchLocation == -1 ) { alert( "There are no events in this file. Here's what I got from\n"+Channel.URI.spec+"\nResult: "+result ); return false; } else { onResponse( result ); } return true; } } var myInstance = Components.classes["@mozilla.org/network/stream-loader;1"].createInstance(Components.interfaces.nsIStreamLoader); dump( "init channel, \nChannel is "+Channel+"\nURL is "+Channel.URI.spec+"\n" ); window.setCursor( "wait" ); myInstance.init( Channel, Listener, null );} |
var BeginEventText = "BEGIN:VEVENT"; var firstMatchLocation = result.indexOf( BeginEventText ); if( firstMatchLocation == -1 ) { alert( "There are no events in this file. Here's what I got from\n"+Channel.URI.spec+"\nResult: "+result ); return false; } else { onResponse( result ); } return true; | if( gNextSubNodeToRefresh ) gCalendarWindow.calendarManager.refreshAllRemoteCalendars(); return retval; | calendarManager.prototype.getRemoteCalendarText = function calMan_getRemoteCalendarText( Channel, onResponse, onError ){ var Listener = { onStreamComplete: function(loader, ctxt, status, resultLength, result) { window.setCursor( "default" ); //check to make sure its actually a calendar file, if not return. if( result.indexOf( "BEGIN:VCALENDAR" ) == -1 ) { alert( "This doesn't appear to be a valid file. Here's what I got back from\n"+Channel.URI.spec+":\nResult:"+result ); return false; } //if we have only one event, open the event dialog. var BeginEventText = "BEGIN:VEVENT"; var firstMatchLocation = result.indexOf( BeginEventText ); if( firstMatchLocation == -1 ) { alert( "There are no events in this file. Here's what I got from\n"+Channel.URI.spec+"\nResult: "+result ); return false; } else { onResponse( result ); } return true; } } var myInstance = Components.classes["@mozilla.org/network/stream-loader;1"].createInstance(Components.interfaces.nsIStreamLoader); dump( "init channel, \nChannel is "+Channel+"\nURL is "+Channel.URI.spec+"\n" ); window.setCursor( "wait" ); myInstance.init( Channel, Listener, null );} |
calendarManager.prototype.launchAddCalendarDialog = function calMan_launchAddCalendarDialog( ) | calendarManager.prototype.launchAddCalendarDialog = function calMan_launchAddCalendarDialog( aName, aUrl ) | calendarManager.prototype.launchAddCalendarDialog = function calMan_launchAddCalendarDialog( ){ // set up a bunch of args to pass to the dialog var ThisCalendarObject = new CalendarObject(); var args = new Object(); args.mode = "new"; var thisManager = this; var callback = function( ThisCalendarObject ) { thisManager.addServerDialogResponse( ThisCalendarObject ) }; args.onOk = callback; args.CalendarObject = ThisCalendarObject; // open the dialog modally openDialog("chrome://calendar/content/calendarServerDialog.xul", "caAddServer", "chrome,modal", args );} |
if( aName ) ThisCalendarObject.name = aName; if( aUrl ) { ThisCalendarObject.remote = true; ThisCalendarObject.remotePath = aUrl; } | calendarManager.prototype.launchAddCalendarDialog = function calMan_launchAddCalendarDialog( ){ // set up a bunch of args to pass to the dialog var ThisCalendarObject = new CalendarObject(); var args = new Object(); args.mode = "new"; var thisManager = this; var callback = function( ThisCalendarObject ) { thisManager.addServerDialogResponse( ThisCalendarObject ) }; args.onOk = callback; args.CalendarObject = ThisCalendarObject; // open the dialog modally openDialog("chrome://calendar/content/calendarServerDialog.xul", "caAddServer", "chrome,modal", args );} |
|
SelectedCalendar.getAttribute( "http: SelectedCalendar.getAttribute( "http: | calendarManager.prototype.publishCalendar = function calMan_publishCalendar( SelectedCalendar ){ if( !SelectedCalendar ) { var SelectedCalendarId = this.getSelectedCalendarId(); SelectedCalendar = this.rdf.getNode( SelectedCalendarId ); } calendarUploadFile(SelectedCalendar.getAttribute( "http://home.netscape.com/NC-rdf#path" ), SelectedCalendar.getAttribute( "http://home.netscape.com/NC-rdf#remotePath" ), SelectedCalendar.getAttribute( "http://home.netscape.com/NC-rdf#username" ), SelectedCalendar.getAttribute( "http://home.netscape.com/NC-rdf#password" ), "text/calendar");} |
|
"", | calendarManager.prototype.publishCalendar = function calMan_publishCalendar( SelectedCalendar ){ if( !SelectedCalendar ) { var SelectedCalendarId = this.getSelectedCalendarId(); var SelectedCalendar = this.rdf.getNode( SelectedCalendarId ); } calendarUploadFile(SelectedCalendar.getAttribute( "http://home.netscape.com/NC-rdf#path" ), SelectedCalendar.getAttribute( "http://home.netscape.com/NC-rdf#remotePath" ), "", SelectedCalendar.getAttribute( "http://home.netscape.com/NC-rdf#login" ), SelectedCalendar.getAttribute( "http://home.netscape.com/NC-rdf#password" ), "text/calendar");} |
|
for( var i = 0; i < SubNodes.length; i++ ) | for( var i = gNextSubNodeToRefresh; i < SubNodes.length; i++ ) | calendarManager.prototype.refreshAllRemoteCalendars = function calMan_refreshAllRemoteCalendars(){ //get all the calendars. //get all the other calendars var SubNodes = this.rootContainer.getSubNodes(); for( var i = 0; i < SubNodes.length; i++ ) { //check their remote attribute, if its true, call retrieveAndSaveRemoteCalendar() if( SubNodes[i].getAttribute( "http://home.netscape.com/NC-rdf#remote" ) == "true" ) { this.retrieveAndSaveRemoteCalendar( SubNodes[i] ); } }} |
gNextSubNodeToRefresh = 0; | calendarManager.prototype.refreshAllRemoteCalendars = function calMan_refreshAllRemoteCalendars(){ //get all the calendars. //get all the other calendars var SubNodes = this.rootContainer.getSubNodes(); for( var i = 0; i < SubNodes.length; i++ ) { //check their remote attribute, if its true, call retrieveAndSaveRemoteCalendar() if( SubNodes[i].getAttribute( "http://home.netscape.com/NC-rdf#remote" ) == "true" ) { this.retrieveAndSaveRemoteCalendar( SubNodes[i] ); } }} |
|
var Path; if( ThisCalendarObject.getAttribute( "http: ThisCalendarObject.getAttribute( "http: { var RemotePath = ThisCalendarObject.getAttribute( "http: var Protocol; if( RemotePath.indexOf( "http: { Protocol = "http: RemotePath = RemotePath.substr( 7 ); } if( RemotePath.indexOf( "https: { Protocol = "https: RemotePath = RemotePath.substr( 8 ); } if( RemotePath.indexOf( "ftp: { Protocol = "ftp: RemotePath = RemotePath.substr( 6 ); } Path = Protocol+ThisCalendarObject.getAttribute( "http: } else Path = ThisCalendarObject.getAttribute( "http: | var Path = ThisCalendarObject.getAttribute( "http: | calendarManager.prototype.retrieveAndSaveRemoteCalendar = function calMan_retrieveAndSaveRemoteCalendar( ThisCalendarObject, onResponseExtra ){ //the image doesn't always exist. If it doesn't exist, it causes problems, so check for it here document.getElementById( ThisCalendarObject.getSubject() ).childNodes[1].childNodes[0].setAttribute( "synching", "true" ); var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); var Path; if( ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#username" ) != "" || ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#password" ) != "" ) { var RemotePath = ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#remotePath" ); var Protocol; if( RemotePath.indexOf( "http://" ) != -1 ) { Protocol = "http://"; RemotePath = RemotePath.substr( 7 ); } if( RemotePath.indexOf( "https://" ) != -1 ) { Protocol = "https://"; RemotePath = RemotePath.substr( 8 ); } if( RemotePath.indexOf( "ftp://" ) != -1 ) { Protocol = "ftp://"; RemotePath = RemotePath.substr( 6 ); } Path = Protocol+ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#username" )+":"+ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#password" )+"@"+RemotePath; } else Path = ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#remotePath" ); var Channel = ioService.newChannel( Path, null, null ); Channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE; var CalendarManager = this; var onResponse = function( CalendarData ) { //save the stream to a file. //saveDataToFile( ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#path" ), CalendarData, "UTF-8" ); saveDataToFile( ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#path" ), CalendarData, null ); if( onResponseExtra ) onResponseExtra(); CalendarManager.removeCalendar( ThisCalendarObject ); if( ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#active" ) == "true" ) { CalendarManager.addCalendar( ThisCalendarObject ); } refreshEventTree( getAndSetEventTable() ); refreshToDoTree( false ); CalendarManager.CalendarWindow.currentView.refreshEvents(); document.getElementById( ThisCalendarObject.getSubject() ).childNodes[1].childNodes[0].removeAttribute( "synching" ); } var CalendarData = this.getRemoteCalendarText( Channel, onResponse, null );} |
request.open( "GET", ThisCalendarObject.remotePath, true ); | request.open( "GET", ThisCalendarObject.remotePath, false ); | calendarManager.prototype.retrieveAndSaveRemoteCalendar = function calMan_retrieveAndSaveRemoteCalendar( ThisCalendarObject, onResponse ){ calendarToGet = ThisCalendarObject; // make a request xmlhttprequest = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"] request = xmlhttprequest.createInstance( Components.interfaces.nsIXMLHttpRequest ); request.addEventListener( "load", onResponse, false ); request.addEventListener( "error", onError, false ); request.open( "GET", ThisCalendarObject.remotePath, true ); // true means async request.send( null );} |
this.mObservers = Array(); this.mItems = { }; | this.initMemoryCalendar(); | function calMemoryCalendar() { this.wrappedJSObject = this; this.mObservers = Array(); this.mItems = { };} |
document.getElementById( "cut_command" ).removeAttribute( "disabled" ); | var ArrayOfElements = document.getElementsByAttribute( "disabledwhennoeventsselected", "true" ); for( var i = 0; i < ArrayOfElements.length; i++ ) ArrayOfElements[i].removeAttribute( "disabled" ); | CalendarEventSelection.prototype.onSelectionChanged = function calSel_onSelectionChanged( ){ if( this.selectedEvents.length > 0 ) { document.getElementById( "cut_command" ).removeAttribute( "disabled" ); document.getElementById( "copy_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command_no_confirm" ).removeAttribute( "disabled" ); if( this.selectedEvents.length == 1 ) document.getElementById( "modify_command" ).removeAttribute( "disabled" ); else document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); if (gMailAccounts) { document.getElementById("send_event_command").removeAttribute("disabled"); } document.getElementById( "print_command" ).removeAttribute( "disabled" ); } else { document.getElementById( "cut_command" ).setAttribute( "disabled", "true" ); document.getElementById( "copy_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command_no_confirm" ).setAttribute( "disabled", "true" ); document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); document.getElementById("send_event_command").setAttribute("disabled", "true"); document.getElementById("print_command").setAttribute("disabled", "true"); } for( var index in this.observerList ) { var observer = this.observerList[ index ]; if( "onSelectionChanged" in observer ) { observer.onSelectionChanged( this.selectedEvents ); } }} |
document.getElementById( "copy_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command_no_confirm" ).removeAttribute( "disabled" ); if( this.selectedEvents.length == 1 ) document.getElementById( "modify_command" ).removeAttribute( "disabled" ); else | if( this.selectedEvents.length != 1 ) | CalendarEventSelection.prototype.onSelectionChanged = function calSel_onSelectionChanged( ){ if( this.selectedEvents.length > 0 ) { document.getElementById( "cut_command" ).removeAttribute( "disabled" ); document.getElementById( "copy_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command_no_confirm" ).removeAttribute( "disabled" ); if( this.selectedEvents.length == 1 ) document.getElementById( "modify_command" ).removeAttribute( "disabled" ); else document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); if (gMailAccounts) { document.getElementById("send_event_command").removeAttribute("disabled"); } document.getElementById( "print_command" ).removeAttribute( "disabled" ); } else { document.getElementById( "cut_command" ).setAttribute( "disabled", "true" ); document.getElementById( "copy_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command_no_confirm" ).setAttribute( "disabled", "true" ); document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); document.getElementById("send_event_command").setAttribute("disabled", "true"); document.getElementById("print_command").setAttribute("disabled", "true"); } for( var index in this.observerList ) { var observer = this.observerList[ index ]; if( "onSelectionChanged" in observer ) { observer.onSelectionChanged( this.selectedEvents ); } }} |
document.getElementById( "print_command" ).removeAttribute( "disabled" ); | CalendarEventSelection.prototype.onSelectionChanged = function calSel_onSelectionChanged( ){ if( this.selectedEvents.length > 0 ) { document.getElementById( "cut_command" ).removeAttribute( "disabled" ); document.getElementById( "copy_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command_no_confirm" ).removeAttribute( "disabled" ); if( this.selectedEvents.length == 1 ) document.getElementById( "modify_command" ).removeAttribute( "disabled" ); else document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); if (gMailAccounts) { document.getElementById("send_event_command").removeAttribute("disabled"); } document.getElementById( "print_command" ).removeAttribute( "disabled" ); } else { document.getElementById( "cut_command" ).setAttribute( "disabled", "true" ); document.getElementById( "copy_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command_no_confirm" ).setAttribute( "disabled", "true" ); document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); document.getElementById("send_event_command").setAttribute("disabled", "true"); document.getElementById("print_command").setAttribute("disabled", "true"); } for( var index in this.observerList ) { var observer = this.observerList[ index ]; if( "onSelectionChanged" in observer ) { observer.onSelectionChanged( this.selectedEvents ); } }} |
|
document.getElementById( "cut_command" ).setAttribute( "disabled", "true" ); document.getElementById( "copy_command" ).setAttribute( "disabled", "true" ); | var ArrayOfElements = document.getElementsByAttribute( "disabledwhennoeventsselected", "true" ); | CalendarEventSelection.prototype.onSelectionChanged = function calSel_onSelectionChanged( ){ if( this.selectedEvents.length > 0 ) { document.getElementById( "cut_command" ).removeAttribute( "disabled" ); document.getElementById( "copy_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command_no_confirm" ).removeAttribute( "disabled" ); if( this.selectedEvents.length == 1 ) document.getElementById( "modify_command" ).removeAttribute( "disabled" ); else document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); if (gMailAccounts) { document.getElementById("send_event_command").removeAttribute("disabled"); } document.getElementById( "print_command" ).removeAttribute( "disabled" ); } else { document.getElementById( "cut_command" ).setAttribute( "disabled", "true" ); document.getElementById( "copy_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command_no_confirm" ).setAttribute( "disabled", "true" ); document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); document.getElementById("send_event_command").setAttribute("disabled", "true"); document.getElementById("print_command").setAttribute("disabled", "true"); } for( var index in this.observerList ) { var observer = this.observerList[ index ]; if( "onSelectionChanged" in observer ) { observer.onSelectionChanged( this.selectedEvents ); } }} |
document.getElementById( "delete_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command_no_confirm" ).setAttribute( "disabled", "true" ); | for( var i = 0; i < ArrayOfElements.length; i++ ) ArrayOfElements[i].setAttribute( "disabled", "true" ); | CalendarEventSelection.prototype.onSelectionChanged = function calSel_onSelectionChanged( ){ if( this.selectedEvents.length > 0 ) { document.getElementById( "cut_command" ).removeAttribute( "disabled" ); document.getElementById( "copy_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command_no_confirm" ).removeAttribute( "disabled" ); if( this.selectedEvents.length == 1 ) document.getElementById( "modify_command" ).removeAttribute( "disabled" ); else document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); if (gMailAccounts) { document.getElementById("send_event_command").removeAttribute("disabled"); } document.getElementById( "print_command" ).removeAttribute( "disabled" ); } else { document.getElementById( "cut_command" ).setAttribute( "disabled", "true" ); document.getElementById( "copy_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command_no_confirm" ).setAttribute( "disabled", "true" ); document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); document.getElementById("send_event_command").setAttribute("disabled", "true"); document.getElementById("print_command").setAttribute("disabled", "true"); } for( var index in this.observerList ) { var observer = this.observerList[ index ]; if( "onSelectionChanged" in observer ) { observer.onSelectionChanged( this.selectedEvents ); } }} |
document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); document.getElementById("send_event_command").setAttribute("disabled", "true"); document.getElementById("print_command").setAttribute("disabled", "true"); | CalendarEventSelection.prototype.onSelectionChanged = function calSel_onSelectionChanged( ){ if( this.selectedEvents.length > 0 ) { document.getElementById( "cut_command" ).removeAttribute( "disabled" ); document.getElementById( "copy_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command" ).removeAttribute( "disabled" ); document.getElementById( "delete_command_no_confirm" ).removeAttribute( "disabled" ); if( this.selectedEvents.length == 1 ) document.getElementById( "modify_command" ).removeAttribute( "disabled" ); else document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); if (gMailAccounts) { document.getElementById("send_event_command").removeAttribute("disabled"); } document.getElementById( "print_command" ).removeAttribute( "disabled" ); } else { document.getElementById( "cut_command" ).setAttribute( "disabled", "true" ); document.getElementById( "copy_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command" ).setAttribute( "disabled", "true" ); document.getElementById( "delete_command_no_confirm" ).setAttribute( "disabled", "true" ); document.getElementById( "modify_command" ).setAttribute( "disabled", "true" ); document.getElementById("send_event_command").setAttribute("disabled", "true"); document.getElementById("print_command").setAttribute("disabled", "true"); } for( var index in this.observerList ) { var observer = this.observerList[ index ]; if( "onSelectionChanged" in observer ) { observer.onSelectionChanged( this.selectedEvents ); } }} |
|
this.checkDisplayDatesInvariant(dayDisplayEventList[i]); | CalendarView.prototype.getViewLimits = function calView_getViewLimits( dayDisplayEventList, date ){ //set defaults from preferences var sHour = getIntPref( this.calendarWindow.calendarPreferences.calendarPref, "event.defaultstarthour", 8 ); var eHour = getIntPref( this.calendarWindow.calendarPreferences.calendarPref, "event.defaultendhour", 17 ); //get date start and end as millisecs for comparisons var tmpDate =new Date(date); tmpDate.setHours(0,0,0); var dateStart = tmpDate.valueOf(); tmpDate.setHours(23,59,59); var dateEnd = tmpDate.valueOf(); for ( var i = 0; i < dayDisplayEventList.length; i++ ) { if( dayDisplayEventList[i].event.startDate.isDate != true ) { if( dayDisplayEventList[i].displayDate < dateStart ) { sHour=0; } else { if( dayDisplayEventList[i].displayDate <= (dateStart + sHour*kDate_MillisecondsInHour)) sHour = Math.floor((dayDisplayEventList[i].displayDate - dateStart)/kDate_MillisecondsInHour); } if( dayDisplayEventList[i].displayEndDate > dateEnd ) { eHour=23; } else { if( dayDisplayEventList[i].displayEndDate > (dateStart + (eHour)*kDate_MillisecondsInHour) ) eHour = Math.ceil((dayDisplayEventList[i].displayEndDate - dateStart)/kDate_MillisecondsInHour); } } } return { startHour: sHour, endHour: eHour };} |
|
"X-NSCP-CALPROPS-RELATIVE_CALID", {})[0]) { | "X-NSCP-CALPROPS-RELATIVE-CALID", {})[0]) { | function calWcapCalendar( calId, session, /*optional*/calProps ) { this.wrappedJSObject = this; this.m_calId = calId; this.m_session = session; this.m_calProps = calProps; this.m_bSuppressAlarms = SUPPRESS_ALARMS; // init queued calls: this.adoptItem = makeQueuedCall(this.session.asyncQueue, this, this.adoptItem_queued); this.modifyItem = makeQueuedCall(this.session.asyncQueue, this, this.modifyItem_queued); this.deleteItem = makeQueuedCall(this.session.asyncQueue, this, this.deleteItem_queued); this.getItem = makeQueuedCall(this.session.asyncQueue, this, this.getItem_queued); this.getItems = makeQueuedCall(this.session.asyncQueue, this, this.getItems_queued); this.syncChangesTo = makeQueuedCall(this.session.asyncQueue, this, this.syncChangesTo_queued); if (LOG_LEVEL > 0 && this.m_calProps) { if (this.m_calId != this.getCalendarProperties( "X-NSCP-CALPROPS-RELATIVE_CALID", {})[0]) { this.notifyError("calId mismatch: " + this.m_calId + " vs. " + ar[0]); } }} |
var observerService = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); observerService.addObserver( this, "quit-application", false ); observerService.addObserver( this, "network:offline-about-to-go-offline", false ); | function calWcapSession() { this.wrappedJSObject = this; this.m_observers = []; this.m_calIdToCalendar = {}; this.m_asyncQueue = new AsyncQueue(); this.m_calPropsTimer = new Timer(); // init queued calls: this.getFreeBusyTimes = makeQueuedCall( this.asyncQueue, this, this.getFreeBusyTimes_queued); this.searchForCalendars = makeQueuedCall( this.asyncQueue, this, this.searchForCalendars_queued); // listen for shutdown, being logged out: // network:offline-about-to-go-offline will be fired for // XPCOM shutdown, too. // xxx todo: alternatively, add shutdown notifications to cal manager // xxx todo: how to simplify this for multiple topics? var observerService = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); observerService.addObserver( this, "quit-application", false /* don't hold weakly: xxx todo */ ); observerService.addObserver( this, "network:offline-about-to-go-offline", false /* don't hold weakly: xxx todo */ );} |
|
setTimeout( "refreshEventTree( false );", 150 ); | setTimeout( "refreshEventTree( getAndSetEventTable() );", 150 ); | CalendarWindow.prototype.setSelectedDate = function calWin_setSelectedDate( date ){ // Copy the date because we might mess with it in place this.selectedDate = new Date( date ); if( document.getElementById( "event-filter-menulist" ).selectedItem.value == "current" ) { //redraw the top tree setTimeout( "refreshEventTree( false );", 150 ); }} |
document.getElementById("day_view_command").setAttribute("disabled", true); document.getElementById("week_view_command").removeAttribute("disabled"); document.getElementById("multiweek_view_command").removeAttribute("disabled"); document.getElementById("month_view_command").removeAttribute("disabled"); | document.getElementById("month_view_command").removeAttribute("checked"); document.getElementById("multiweek_view_command").removeAttribute("checked"); document.getElementById("week_view_command").removeAttribute("checked"); document.getElementById("day_view_command").setAttribute("checked", true); | CalendarWindow.prototype.switchToDayView = function calWin_switchToDayView( ){ document.getElementById("day_view_command").setAttribute("disabled", true); document.getElementById("week_view_command").removeAttribute("disabled"); document.getElementById("multiweek_view_command").removeAttribute("disabled"); document.getElementById("month_view_command").removeAttribute("disabled"); this.switchToView('day-view');} |
document.getElementById("day_view_command").removeAttribute("disabled"); document.getElementById("week_view_command").removeAttribute("disabled"); document.getElementById("multiweek_view_command").removeAttribute("disabled"); document.getElementById("month_view_command").setAttribute("disabled", true); | document.getElementById("week_view_command").removeAttribute("checked"); document.getElementById("multiweek_view_command").removeAttribute("checked"); document.getElementById("day_view_command").removeAttribute("checked"); document.getElementById("month_view_command").setAttribute("checked", true); | CalendarWindow.prototype.switchToMonthView = function calWin_switchToMonthView( ){ document.getElementById("day_view_command").removeAttribute("disabled"); document.getElementById("week_view_command").removeAttribute("disabled"); document.getElementById("multiweek_view_command").removeAttribute("disabled"); document.getElementById("month_view_command").setAttribute("disabled", true); this.switchToView('month-view');} |
document.getElementById("day_view_command").removeAttribute("disabled"); document.getElementById("week_view_command").removeAttribute("disabled"); document.getElementById("multiweek_view_command").setAttribute("disabled", true); document.getElementById("month_view_command").removeAttribute("disabled"); | document.getElementById("month_view_command").removeAttribute("checked"); document.getElementById("week_view_command").removeAttribute("checked"); document.getElementById("day_view_command").removeAttribute("checked"); document.getElementById("multiweek_view_command").setAttribute("checked", true); | CalendarWindow.prototype.switchToMultiweekView = function calWin_switchToMultiweekView( ){ document.getElementById("day_view_command").removeAttribute("disabled"); document.getElementById("week_view_command").removeAttribute("disabled"); document.getElementById("multiweek_view_command").setAttribute("disabled", true); document.getElementById("month_view_command").removeAttribute("disabled"); this.switchToView('multiweek-view');} |
deck.selectedPanel = document.getElementById(newView); | deck.selectedPanel = viewElement; | CalendarWindow.prototype.switchToView = function calWin_switchToView( newView ){ var deck = document.getElementById("view-deck"); var day; try { day = deck.selectedPanel.selectedDay; } catch(ex) {} // Fails if no view has ever been shown this session // Should only happen on first startup if (!day) day = now(); deck.selectedPanel = document.getElementById(newView); deck.selectedPanel.goToDay(day);} |
viewElement.timezone = calendarDefaultTimezone(); | CalendarWindow.prototype.switchToView = function calWin_switchToView( newView ){ var viewElement = document.getElementById(newView); // If this is the first time we've shown the view, (or if someone changed // our composite), then we need to set all this stuff. if (viewElement.displayCalendar != getDisplayComposite()) { viewElement.controller = gViewController; viewElement.displayCalendar = getDisplayComposite(); this.EventSelection.addObserver(viewElement.selectionObserver); } var deck = document.getElementById("view-deck"); var day; try { day = deck.selectedPanel.selectedDay; } catch(ex) {} // Fails if no view has ever been shown this session // Should only happen on first startup if (!day) day = now(); deck.selectedPanel = viewElement; deck.selectedPanel.goToDay(day);} |
|
document.getElementById("day_view_command").removeAttribute("disabled"); document.getElementById("week_view_command").setAttribute("disabled", true); document.getElementById("multiweek_view_command").removeAttribute("disabled"); document.getElementById("month_view_command").removeAttribute("disabled"); | document.getElementById("month_view_command").removeAttribute("checked"); document.getElementById("multiweek_view_command").removeAttribute("checked"); document.getElementById("day_view_command").removeAttribute("checked"); document.getElementById("week_view_command").setAttribute("checked", true); | CalendarWindow.prototype.switchToWeekView = function calWin_switchToWeekView( ){ document.getElementById("day_view_command").removeAttribute("disabled"); document.getElementById("week_view_command").setAttribute("disabled", true); document.getElementById("multiweek_view_command").removeAttribute("disabled"); document.getElementById("month_view_command").removeAttribute("disabled"); this.switchToView('week-view');} |
setTimeout( "refreshEventTree( false );", 10 ); | setTimeout( "refreshEventTree( getAndSetEventTable() );", 10 ); | CalendarWindow.prototype.onMouseUpCalendarViewSplitter = function calWinOnMouseUpCalendarViewSplitter(){ //check if calendar-view-splitter is collapsed if( document.getElementById( "bottom-events-box" ).getAttribute( "collapsed" ) != "true" ) { //do this because if they started with it collapsed, its not showing anything right now. //in a setTimeout to give the pull down menu time to draw. setTimeout( "refreshEventTree( false );", 10 ); } this.doResize();} |
if (! editedtests[0]) { MM_findObj("Submit").value = "Submit Results"; } | document.getElementById("show_test_form").action = "process_test.cgi"; | function cancelEdit(testid) { for (var i=0; i<fields.length; i++) { hide(getField(fields[i]+"_edit",testid)); show(getField(fields[i]+"_text",testid)); } show(getField("editlink", testid)); hide(getField("canceleditlink", testid)); // remove testid from the editedtests array: var newarray = new Array(); for (var i=0; i<editedtests.length; i++) { if (editedtests[i] != testid) { newarray.push(testid); } } editedtests=newarray; if (! editedtests[0]) { MM_findObj("Submit").value = "Submit Results"; }} |
canDestroy: function canDestroy(prompt) { return false; }, | optgroupObject.prototype.canDestroy = function canDestroy(prompt) { return gDialog.nextChild(treeSelection.currentIndex) - treeSelection.currentIndex == 1; }; | canDestroy: function canDestroy(prompt) { return false; }, |
if (orientation != Components.interfaces.nsITreeView.DROP_ON) return false; | dragSession.getData(trans, i); | canDrop: function(index, orientation) { if (orientation != Components.interfaces.nsITreeView.DROP_ON) return false; var targetResource = dirTree.builderView.getResourceAtIndex(index); var targetURI = targetResource.Value; var srcURI = GetSelectedDirectory(); if (targetURI == srcURI) return false; var srcDirectory = GetDirectoryFromURI(srcURI); var dragSession = dragService.getCurrentSession(); if (!dragSession) return false; // Only allow copy from read-only directories. if (!(srcDirectory.operations & srcDirectory.opWrite) && dragSession.dragAction != Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY) return false; // determine if we dragging from a mailing list on a directory x to the parent (directory x). // if so, don't allow the drop var result = srcURI.split(targetURI); if (result != srcURI) return false; // check if we can write to the target directory // LDAP is readonly var targetDirectory = GetDirectoryFromURI(targetURI); return (targetDirectory.isMailList || (targetDirectory.operations & targetDirectory.opWrite)); }, |
var targetResource = dirTree.builderView.getResourceAtIndex(index); var targetURI = targetResource.Value; | var dataObj = new Object(); var flavor = new Object(); var len = new Object(); trans.getAnyTransferData(flavor, dataObj, len); if (!dataObj) continue; | canDrop: function(index, orientation) { if (orientation != Components.interfaces.nsITreeView.DROP_ON) return false; var targetResource = dirTree.builderView.getResourceAtIndex(index); var targetURI = targetResource.Value; var srcURI = GetSelectedDirectory(); if (targetURI == srcURI) return false; var srcDirectory = GetDirectoryFromURI(srcURI); var dragSession = dragService.getCurrentSession(); if (!dragSession) return false; // Only allow copy from read-only directories. if (!(srcDirectory.operations & srcDirectory.opWrite) && dragSession.dragAction != Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY) return false; // determine if we dragging from a mailing list on a directory x to the parent (directory x). // if so, don't allow the drop var result = srcURI.split(targetURI); if (result != srcURI) return false; // check if we can write to the target directory // LDAP is readonly var targetDirectory = GetDirectoryFromURI(targetURI); return (targetDirectory.isMailList || (targetDirectory.operations & targetDirectory.opWrite)); }, |
var srcURI = GetSelectedDirectory(); | dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString); | canDrop: function(index, orientation) { if (orientation != Components.interfaces.nsITreeView.DROP_ON) return false; var targetResource = dirTree.builderView.getResourceAtIndex(index); var targetURI = targetResource.Value; var srcURI = GetSelectedDirectory(); if (targetURI == srcURI) return false; var srcDirectory = GetDirectoryFromURI(srcURI); var dragSession = dragService.getCurrentSession(); if (!dragSession) return false; // Only allow copy from read-only directories. if (!(srcDirectory.operations & srcDirectory.opWrite) && dragSession.dragAction != Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY) return false; // determine if we dragging from a mailing list on a directory x to the parent (directory x). // if so, don't allow the drop var result = srcURI.split(targetURI); if (result != srcURI) return false; // check if we can write to the target directory // LDAP is readonly var targetDirectory = GetDirectoryFromURI(targetURI); return (targetDirectory.isMailList || (targetDirectory.operations & targetDirectory.opWrite)); }, |
if (targetURI == srcURI) return false; | var transData = dataObj.data.split("\n"); var rows = transData[0].split(","); | canDrop: function(index, orientation) { if (orientation != Components.interfaces.nsITreeView.DROP_ON) return false; var targetResource = dirTree.builderView.getResourceAtIndex(index); var targetURI = targetResource.Value; var srcURI = GetSelectedDirectory(); if (targetURI == srcURI) return false; var srcDirectory = GetDirectoryFromURI(srcURI); var dragSession = dragService.getCurrentSession(); if (!dragSession) return false; // Only allow copy from read-only directories. if (!(srcDirectory.operations & srcDirectory.opWrite) && dragSession.dragAction != Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY) return false; // determine if we dragging from a mailing list on a directory x to the parent (directory x). // if so, don't allow the drop var result = srcURI.split(targetURI); if (result != srcURI) return false; // check if we can write to the target directory // LDAP is readonly var targetDirectory = GetDirectoryFromURI(targetURI); return (targetDirectory.isMailList || (targetDirectory.operations & targetDirectory.opWrite)); }, |
var srcDirectory = GetDirectoryFromURI(srcURI); | for (var j = 0; j < rows.length; j++) { if (abView.getCardFromRow(rows[j]).isMailList) { draggingMailList = true; break; } } } | canDrop: function(index, orientation) { if (orientation != Components.interfaces.nsITreeView.DROP_ON) return false; var targetResource = dirTree.builderView.getResourceAtIndex(index); var targetURI = targetResource.Value; var srcURI = GetSelectedDirectory(); if (targetURI == srcURI) return false; var srcDirectory = GetDirectoryFromURI(srcURI); var dragSession = dragService.getCurrentSession(); if (!dragSession) return false; // Only allow copy from read-only directories. if (!(srcDirectory.operations & srcDirectory.opWrite) && dragSession.dragAction != Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY) return false; // determine if we dragging from a mailing list on a directory x to the parent (directory x). // if so, don't allow the drop var result = srcURI.split(targetURI); if (result != srcURI) return false; // check if we can write to the target directory // LDAP is readonly var targetDirectory = GetDirectoryFromURI(targetURI); return (targetDirectory.isMailList || (targetDirectory.operations & targetDirectory.opWrite)); }, |
var dragSession = dragService.getCurrentSession(); if (!dragSession) return false; | if (draggingMailList && (targetDirectory.isMailList || dragSession.dragAction == Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY)) { return false; } | canDrop: function(index, orientation) { if (orientation != Components.interfaces.nsITreeView.DROP_ON) return false; var targetResource = dirTree.builderView.getResourceAtIndex(index); var targetURI = targetResource.Value; var srcURI = GetSelectedDirectory(); if (targetURI == srcURI) return false; var srcDirectory = GetDirectoryFromURI(srcURI); var dragSession = dragService.getCurrentSession(); if (!dragSession) return false; // Only allow copy from read-only directories. if (!(srcDirectory.operations & srcDirectory.opWrite) && dragSession.dragAction != Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY) return false; // determine if we dragging from a mailing list on a directory x to the parent (directory x). // if so, don't allow the drop var result = srcURI.split(targetURI); if (result != srcURI) return false; // check if we can write to the target directory // LDAP is readonly var targetDirectory = GetDirectoryFromURI(targetURI); return (targetDirectory.isMailList || (targetDirectory.operations & targetDirectory.opWrite)); }, |
if (!(srcDirectory.operations & srcDirectory.opWrite) && dragSession.dragAction != Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY) return false; var result = srcURI.split(targetURI); if (result != srcURI) return false; var targetDirectory = GetDirectoryFromURI(targetURI); return (targetDirectory.isMailList || (targetDirectory.operations & targetDirectory.opWrite)); }, | dragSession.canDrop = true; return true; }, | canDrop: function(index, orientation) { if (orientation != Components.interfaces.nsITreeView.DROP_ON) return false; var targetResource = dirTree.builderView.getResourceAtIndex(index); var targetURI = targetResource.Value; var srcURI = GetSelectedDirectory(); if (targetURI == srcURI) return false; var srcDirectory = GetDirectoryFromURI(srcURI); var dragSession = dragService.getCurrentSession(); if (!dragSession) return false; // Only allow copy from read-only directories. if (!(srcDirectory.operations & srcDirectory.opWrite) && dragSession.dragAction != Components.interfaces. nsIDragService.DRAGDROP_ACTION_COPY) return false; // determine if we dragging from a mailing list on a directory x to the parent (directory x). // if so, don't allow the drop var result = srcURI.split(targetURI); if (result != srcURI) return false; // check if we can write to the target directory // LDAP is readonly var targetDirectory = GetDirectoryFromURI(targetURI); return (targetDirectory.isMailList || (targetDirectory.operations & targetDirectory.opWrite)); }, |
canMoveDown: function canMoveDown() { return false; }, | optgroupObject.prototype.canMoveDown = function canMoveDown() { return gDialog.lastChild() > treeSelection.currentIndex; } | canMoveDown: function canMoveDown() { return false; }, |
if (!/^(www|http)|\/\s*$/i.test(url)) { | if (!/^(www|http)|\/\s*$/i.test(url) && aTriggeringEvent) { | function canonizeUrl(aTriggeringEvent, aPostDataRef){ if (!gURLBar) return; var url = gURLBar.value; // Prevent suffix when already exists www , http , / if (!/^(www|http)|\/\s*$/i.test(url)) { var suffix = null; if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) suffix = ".org/"; else if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey) { try { suffix = gPrefService.getCharPref("browser.fixup.alternate.suffix"); if (suffix.charAt(suffix.length - 1) != '/') suffix += "/"; } catch(e) { suffix = ".com/"; } } else if (aTriggeringEvent && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) suffix = ".net/"; if (suffix != null) { // trim leading/trailing spaces (bug 233205) url = url.replace( /^\s+/, ""); url = url.replace( /\s+$/, ""); // Tack www. and suffix on. url = "http://www." + url + suffix; } } gURLBar.value = getShortcutOrURI(url, aPostDataRef);} |
if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) | if (accelPressed && shiftPressed) | function canonizeUrl(aTriggeringEvent, aPostDataRef){ if (!gURLBar) return; var url = gURLBar.value; // Prevent suffix when already exists www , http , / if (!/^(www|http)|\/\s*$/i.test(url)) { var suffix = null; if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) suffix = ".org/"; else if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey) { try { suffix = gPrefService.getCharPref("browser.fixup.alternate.suffix"); if (suffix.charAt(suffix.length - 1) != '/') suffix += "/"; } catch(e) { suffix = ".com/"; } } else if (aTriggeringEvent && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) suffix = ".net/"; if (suffix != null) { // trim leading/trailing spaces (bug 233205) url = url.replace( /^\s+/, ""); url = url.replace( /\s+$/, ""); // Tack www. and suffix on. url = "http://www." + url + suffix; } } gURLBar.value = getShortcutOrURI(url, aPostDataRef);} |
else if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey) | else if (accelPressed) | function canonizeUrl(aTriggeringEvent, aPostDataRef){ if (!gURLBar) return; var url = gURLBar.value; // Prevent suffix when already exists www , http , / if (!/^(www|http)|\/\s*$/i.test(url)) { var suffix = null; if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) suffix = ".org/"; else if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey) { try { suffix = gPrefService.getCharPref("browser.fixup.alternate.suffix"); if (suffix.charAt(suffix.length - 1) != '/') suffix += "/"; } catch(e) { suffix = ".com/"; } } else if (aTriggeringEvent && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) suffix = ".net/"; if (suffix != null) { // trim leading/trailing spaces (bug 233205) url = url.replace( /^\s+/, ""); url = url.replace( /\s+$/, ""); // Tack www. and suffix on. url = "http://www." + url + suffix; } } gURLBar.value = getShortcutOrURI(url, aPostDataRef);} |
else if (aTriggeringEvent && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) | else if (shiftPressed) | function canonizeUrl(aTriggeringEvent, aPostDataRef){ if (!gURLBar) return; var url = gURLBar.value; // Prevent suffix when already exists www , http , / if (!/^(www|http)|\/\s*$/i.test(url)) { var suffix = null; if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) suffix = ".org/"; else if (aTriggeringEvent && 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey) { try { suffix = gPrefService.getCharPref("browser.fixup.alternate.suffix"); if (suffix.charAt(suffix.length - 1) != '/') suffix += "/"; } catch(e) { suffix = ".com/"; } } else if (aTriggeringEvent && 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey) suffix = ".net/"; if (suffix != null) { // trim leading/trailing spaces (bug 233205) url = url.replace( /^\s+/, ""); url = url.replace( /\s+$/, ""); // Tack www. and suffix on. url = "http://www." + url + suffix; } } gURLBar.value = getShortcutOrURI(url, aPostDataRef);} |
if (!gURLBar) | if (!gURLBar || !gURLBar.value) | function canonizeUrl(aTriggeringEvent, aPostDataRef){ if (!gURLBar) return; var url = gURLBar.value; // Prevent suffix when already exists www , http , / if (!/^(www|http)|\/\s*$/i.test(url) && aTriggeringEvent) { var suffix = null;#ifdef XP_MACOSX var accelPressed = 'metaKey' in aTriggeringEvent && aTriggeringEvent.metaKey;#else var accelPressed = 'ctrlKey' in aTriggeringEvent && aTriggeringEvent.ctrlKey;#endif var shiftPressed = 'shiftKey' in aTriggeringEvent && aTriggeringEvent.shiftKey; if (accelPressed && shiftPressed) suffix = ".org/"; else if (accelPressed) { try { suffix = gPrefService.getCharPref("browser.fixup.alternate.suffix"); if (suffix.charAt(suffix.length - 1) != '/') suffix += "/"; } catch(e) { suffix = ".com/"; } } else if (shiftPressed) suffix = ".net/"; if (suffix != null) { // trim leading/trailing spaces (bug 233205) url = url.replace( /^\s+/, ""); url = url.replace( /\s+$/, ""); // Tack www. and suffix on. url = "http://www." + url + suffix; } } gURLBar.value = getShortcutOrURI(url, aPostDataRef);} |
const kSuppString = createSupportsString(); | const kSuppString = createSupportsCString(); | function canPaste(){ const kClipboardIID = Components.interfaces.nsIClipboard; var clipboard = getClipboard(); var flavourArray = createSupportsArray(); var flavours = ["text/calendar", "text/unicode"]; for (var i = 0; i < flavours.length; ++i) { const kSuppString = createSupportsString(); kSuppString.data = flavours[i]; flavourArray.AppendElement(kSuppString); } return clipboard.hasDataMatchingFlavors(flavourArray, kClipboardIID.kGlobalClipboard);} |
var flavourArray = createSupportsArray(); | var flavourArray = new SupportsArray; | function canPaste(){ const kClipboardIID = Components.interfaces.nsIClipboard; var clipboard = getClipboard(); var flavourArray = createSupportsArray(); var flavours = ["text/calendar", "text/unicode"]; for (var i = 0; i < flavours.length; ++i) { const kSuppString = createSupportsCString(); kSuppString.data = flavours[i]; flavourArray.AppendElement(kSuppString); } return clipboard.hasDataMatchingFlavors(flavourArray, kClipboardIID.kGlobalClipboard);} |
const kSuppString = createSupportsCString(); | var kSuppString = new SupportsCString; | function canPaste(){ const kClipboardIID = Components.interfaces.nsIClipboard; var clipboard = getClipboard(); var flavourArray = createSupportsArray(); var flavours = ["text/calendar", "text/unicode"]; for (var i = 0; i < flavours.length; ++i) { const kSuppString = createSupportsCString(); kSuppString.data = flavours[i]; flavourArray.AppendElement(kSuppString); } return clipboard.hasDataMatchingFlavors(flavourArray, kClipboardIID.kGlobalClipboard);} |
ChatzillaModule.canUnload = | CalendarModule.canUnload = | ChatzillaModule.canUnload =function(compMgr){ return true;} |
this.loadRegistryData(this); | function CategoryManager() { this.categories = { };} |
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); | if (!getPriv("UniversalXPConnect")) throw ("CBSConnection: could not get UniversalXPConnect privlege."); | function CBSConnection (){ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var sockServiceClass = Components.classesByID["{c07e81e0-ef12-11d2-92b6-00105a1b0d64}"]; if (!sockServiceClass) throw ("Couldn't get socket service class."); var sockService = sockServiceClass.getService(); if (!sockService) throw ("Couldn't get socket service."); this._sockService = sockService.QueryInterface (Components.interfaces.nsISocketTransportService);} |
function CBSConnection () | function CBSConnection (binary) | function CBSConnection (){ var sockServiceClass = Components.classesByID["{c07e81e0-ef12-11d2-92b6-00105a1b0d64}"]; if (!sockServiceClass) throw ("Couldn't get socket service class."); var sockService = sockServiceClass.getService(); if (!sockService) throw ("Couldn't get socket service."); this._sockService = sockService.QueryInterface (Components.interfaces.nsISocketTransportService); this.wrappedJSObject = this;} |
this.wrappedJSObject = this; | function CBSConnection (){ var sockServiceClass = Components.classesByID["{c07e81e0-ef12-11d2-92b6-00105a1b0d64}"]; if (!sockServiceClass) throw ("Couldn't get socket service class."); var sockService = sockServiceClass.getService(); if (!sockService) throw ("Couldn't get socket service."); this._sockService = sockService.QueryInterface (Components.interfaces.nsISocketTransportService);} |
|
dump( "Move window by " + xOffset + ","+yOffset+"\n"); | function centerWindowOnScreen(){ var xOffset = screen.availWidth/2 - window.outerWidth/2; var yOffset = screen.availHeight/2 - window.outerHeight/2; //(opener.outerHeight *2)/10; xOffset = ( xOffset > 0 ) ? xOffset : 0; yOffset = ( yOffset > 0 ) ? yOffset : 0; dump( "Move window by " + xOffset + ","+yOffset+"\n"); window.moveTo( xOffset, yOffset);} |
|
this.parent.messageTo(type, this.encodedName, fromUnicode(msg, this), code); | this.parent.ctcpTo(this.encodedName, fromUnicode(code, this), fromUnicode(msg, this), type); | function chan_ctcpto (code, msg, type){ msg = msg || ""; type = type || "PRIVMSG"; this.parent.messageTo(type, this.encodedName, fromUnicode(msg, this), code);} |
if (name in this.channels) | if (tname in this.channels) | function chan_getchannel(name){ var tname = this.toLowerCase(name); if (tname in this.channels) return this.channels[tname]; tname = this.toLowerCase(fromUnicode(name, this)); if (name in this.channels) return this.channels[tname]; return null;} |
target = this.name.substr(1); | target = escape(this.encodedName.substr(1)); | function chan_geturl (){ var target; if (this.name[0] == "#") target = this.name.substr(1); else target = escape(this.name); return this.parent.parent.getURL() + target;} |
target = escape(this.name); | target = escape(this.encodedName); | function chan_geturl (){ var target; if (this.name[0] == "#") target = this.name.substr(1); else target = escape(this.name); return this.parent.parent.getURL() + target;} |
this.parent.parent.sendData ("MODE " + this.parent.name + " " + | this.parent.parent.sendData ("MODE " + this.parent.encodedName + " " + | function chan_invite (f){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; var modifier = (f) ? "+" : "-"; this.parent.parent.sendData ("MODE " + this.parent.name + " " + modifier + "i\n"); return true; } |
this.parent.sendData("INVITE " + nick + " " + this.name + "\n"); | this.parent.sendData("INVITE " + nick + " " + this.encodedName + "\n"); | function chan_inviteuser (nick){ this.parent.sendData("INVITE " + nick + " " + this.name + "\n"); return true;} |
this.parent.sendData ("JOIN " + this.name + " " + key + "\n"); | this.parent.sendData ("JOIN " + this.encodedName + " " + key + "\n"); | function chan_join (key){ if (!key) key = ""; this.parent.sendData ("JOIN " + this.name + " " + key + "\n"); return true; } |
this.parent.parent.sendData ("MODE " + this.parent.name + " " + | this.parent.parent.sendData ("MODE " + this.parent.encodedName + " " + | function chan_moderate (f){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; var modifier = (f) ? "+" : "-"; this.parent.parent.sendData ("MODE " + this.parent.name + " " + modifier + "m\n"); return true; } |
this.parent.noticeTo (this.name, msg); | this.parent.noticeTo (this.encodedName, msg); | function chan_notice (msg){ this.parent.noticeTo (this.name, msg); } |
this.parent.sendData ("PART " + this.name + "\n"); | this.parent.sendData ("PART " + this.encodedName + "\n"); | function chan_part (){ this.parent.sendData ("PART " + this.name + "\n"); this.users = new Object(); return true; } |
this.users = new Object(); | function chan_part (){ this.parent.sendData ("PART " + this.name + "\n"); return true; } |
|
this.parent.parent.sendData ("MODE " + this.parent.name + " " + | this.parent.parent.sendData ("MODE " + this.parent.encodedName + " " + | function chan_pmessages (f){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; var modifier = (f) ? "-" : "+"; this.parent.parent.sendData ("MODE " + this.parent.name + " " + modifier + "n\n"); return true; } |
this.parent.parent.sendData ("MODE " + this.parent.name + " " + | this.parent.parent.sendData ("MODE " + this.parent.encodedName + " " + | function chan_ptopic (f){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; var modifier = (f) ? "-" : "+"; this.parent.parent.sendData ("MODE " + this.parent.name + " " + modifier + "t\n"); return true; } |
this.parent.parent.sendData ("MODE " + this.parent.name + " " + | this.parent.parent.sendData ("MODE " + this.parent.encodedName + " " + | function chan_pvt (f){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; var modifier = (f) ? "+" : "-"; this.parent.parent.sendData ("MODE " + this.parent.name + " " + modifier + "p\n"); return true; } |
this.parent.actTo (this.name, msg); | this.parent.actTo (this.encodedName, msg); | function chan_say (msg){ this.parent.actTo (this.name, msg); } |
this.parent.parent.sendData ("MODE " + this.parent.name + " " + | this.parent.parent.sendData ("MODE " + this.parent.encodedName + " " + | function chan_secret (f){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; var modifier = (f) ? "+" : "-"; this.parent.parent.sendData ("MODE " + this.parent.name + " " + modifier + "p\n"); return true; } |
(!this.parent.me.isOp)) | (!this.users[this.parent.me.nick].isOp)) | function chan_topic (str){ if ((!this.mode.publicTopic) && (!this.parent.me.isOp)) return false; str = String(str).split("\n"); for (var i in str) this.parent.sendData ("TOPIC " + this.name + " :" + str[i] + "\n"); return true;} |
this.parent.sendData ("TOPIC " + this.name + " :" + str[i] + "\n"); | this.parent.sendData ("TOPIC " + this.encodedName + " :" + str[i] + "\n"); | function chan_topic (str){ if ((!this.mode.publicTopic) && (!this.users[this.parent.me.nick].isOp)) return false; str = String(str).split("\n"); for (var i in str) this.parent.sendData ("TOPIC " + this.name + " :" + str[i] + "\n"); return true;} |
this.parent.parent.sendData ("MODE " + this.parent.name + " -k " + | this.parent.parent.sendData ("MODE " + this.parent.encodedName + " -k " + | function chan_unlock (k){ if (!this.parent.users[this.parent.parent.me.nick].isOp) return false; this.parent.parent.sendData ("MODE " + this.parent.name + " -k " + k + "\n"); return true; } |
caption.setAttribute( "value", aCaption ); | caption.setAttribute( "description", aCaption ); | function ChangeCaption( aCaption ){ var caption = document.getElementById( "header" ); caption.setAttribute( "value", aCaption ); document.title = aCaption;} |
window.title = aCaption; | document.title = aCaption; | function ChangeCaption( aCaption ){ var caption = document.getElementById( "header" ); caption.setAttribute( "value", aCaption ); window.title = aCaption;} |
var ArrayOfElements = document.getElementById( "taskitem-context-menu" ).getElementsByAttribute( "checked", "true" ); for( var i = 0; i < ArrayOfElements.length; i++ ) ArrayOfElements[i].removeAttribute( "checked" ); | var liveList = document.getElementById( "taskitem-context-menu" ).getElementsByAttribute( "checked", "true" ); for (var i = liveList.length - 1; i >= 0; i-- ) { liveList.item(i).removeAttribute( "checked" ); } | function changeContextMenuForToDo( event ){ var toDoItem = getToDoFromEvent( event ); if( toDoItem ) { var ArrayOfElements = document.getElementById( "taskitem-context-menu" ).getElementsByAttribute( "checked", "true" ); for( var i = 0; i < ArrayOfElements.length; i++ ) ArrayOfElements[i].removeAttribute( "checked" ); if( document.getElementById( "percent-"+toDoItem.percent+"-menuitem" ) ) { document.getElementById( "percent-"+toDoItem.percent+"-menuitem" ).setAttribute( "checked", "true" ); } if( document.getElementById( "priority-"+toDoItem.priority+"-menuitem" ) ) { document.getElementById( "priority-"+toDoItem.priority+"-menuitem" ).setAttribute( "checked", "true" ); } }} |
ChangeDirectoryByURI(uri); | var tree = document.getElementById('resultsTree'); if ( tree ) tree.setAttribute('ref', uri); | function ChangeDirectoryByDOMNode(dirNode){ var uri = dirNode.getAttribute('id'); dump("uri = " + uri + "\n"); ChangeDirectoryByURI(uri);} |
document.getElementById("allowScriptsDescription").disabled = state; | document.getElementById("allowScripts").disabled = state; | function changeDisabledState(state){ //Set the states of the groupbox children state based on the "javascript enabled" checkbox value document.getElementById("allowScriptsDescription").disabled = state; document.getElementById("allowWindowMoveResize").disabled = state; document.getElementById("allowWindowOpen").disabled = state; document.getElementById("allowImageSrcChange").disabled = state; document.getElementById("allowDocumentCookieSet").disabled = state; document.getElementById("allowDocumentCookieGet").disabled = state; document.getElementById("allowWindowStatusChange").disabled = state; document.getElementById("allowWindowFlip").disabled = state;} |
refreshEventTree( false ); | getAndSetEventTable() | function changeEventFilter( event ){ refreshEventTree( false ); doSearch(); /* The following isn't exactly right. It should actually reload after the next event happens. */ // get the current time var now = new Date(); var tomorrow = new Date( now.getFullYear(), now.getMonth(), ( now.getDate() + 1 ) ); var milliSecsTillTomorrow = tomorrow.getTime() - now.getTime(); setTimeout( "refreshEventTree( eventTable )", milliSecsTillTomorrow );} |
setTimeout( "refreshEventTree( eventTable )", milliSecsTillTomorrow ); | setTimeout( "refreshEventTree( getAndSetEventTable() )", milliSecsTillTomorrow ); | function changeEventFilter( event ){ refreshEventTree( false ); doSearch(); /* The following isn't exactly right. It should actually reload after the next event happens. */ // get the current time var now = new Date(); var tomorrow = new Date( now.getFullYear(), now.getMonth(), ( now.getDate() + 1 ) ); var milliSecsTillTomorrow = tomorrow.getTime() - now.getTime(); setTimeout( "refreshEventTree( eventTable )", milliSecsTillTomorrow );} |
gNextMessageAfterDelete = null; | function ChangeFolderByURI(uri, isThreaded, sortID, sortDirection){ dump('In ChangeFolderByURI uri = ' + uri + "\n"); if (uri == gCurrentLoadingFolderURI) return; var resource = RDF.GetResource(uri); var msgfolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder); try { setTitleFromFolder(msgfolder, null); } catch (ex) { dump("error setting title: " + ex + "\n"); } //if it's a server, clear the threadpane and don't bother trying to load. if(msgfolder.isServer) { ClearThreadPane(); return; } gBeforeFolderLoadTime = new Date(); gCurrentLoadingFolderURI = uri; if(msgfolder.manyHeadersToDownload()) { try { SetBusyCursor(window, true); gCurrentFolderToReroot = uri; gCurrentLoadingFolderIsThreaded = isThreaded; gCurrentLoadingFolderSortID = sortID; gCurrentLoadingFolderSortDirection = sortDirection; msgfolder.startFolderLoading(); msgfolder.updateFolder(msgWindow); } catch(ex) { dump("Error loading with many headers to download: " + ex + "\n"); } } else { SetBusyCursor(window, true); gCurrentFolderToReroot = ""; gCurrentLoadingFolderIsThreaded = false; gCurrentLoadingFolderSortID = ""; RerootFolder(uri, msgfolder, isThreaded, sortID, sortDirection); //Need to do this after rerooting folder. Otherwise possibility of receiving folder loaded //notification before folder has actually changed. msgfolder.updateFolder(msgWindow); }} |
|
ClearThreadPane(); | ClearThreadPane(); ShowAccountCentral(); | function ChangeFolderByURI(uri, isThreaded, sortID, sortDirection, viewType){ dump('In ChangeFolderByURI uri = ' + uri + "\n"); if (uri == gCurrentLoadingFolderURI) return; var resource = RDF.GetResource(uri); var msgfolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder); try { setTitleFromFolder(msgfolder, null); } catch (ex) { dump("error setting title: " + ex + "\n"); } //if it's a server, clear the threadpane and don't bother trying to load. if(msgfolder.isServer) { ClearThreadPane(); return; } if (showPerformance) { gBeforeFolderLoadTime = new Date(); } gCurrentLoadingFolderURI = uri; gNextMessageAfterDelete = null; // forget what message to select, if any if(msgfolder.manyHeadersToDownload()) { try { SetBusyCursor(window, true); gCurrentFolderToReroot = uri; gCurrentLoadingFolderIsThreaded = isThreaded; gCurrentLoadingFolderSortID = sortID; gCurrentLoadingFolderSortDirection = sortDirection; gCurrentLoadingFolderViewType = viewType; msgfolder.startFolderLoading(); msgfolder.updateFolder(msgWindow); } catch(ex) { dump("Error loading with many headers to download: " + ex + "\n"); } } else { SetBusyCursor(window, true); gCurrentFolderToReroot = ""; gCurrentLoadingFolderIsThreaded = false; gCurrentLoadingFolderSortID = ""; gCurrentLoadingFolderViewType = ""; RerootFolder(uri, msgfolder, isThreaded, sortID, sortDirection, viewType); //Need to do this after rerooting folder. Otherwise possibility of receiving folder loaded //notification before folder has actually changed. msgfolder.updateFolder(msgWindow); }} |
} if (gAccountCentralLoaded) { HideAccountCentral(); | function ChangeFolderByURI(uri, isThreaded, sortID, sortDirection, viewType){ dump('In ChangeFolderByURI uri = ' + uri + "\n"); if (uri == gCurrentLoadingFolderURI) return; var resource = RDF.GetResource(uri); var msgfolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder); try { setTitleFromFolder(msgfolder, null); } catch (ex) { dump("error setting title: " + ex + "\n"); } //if it's a server, clear the threadpane and don't bother trying to load. if(msgfolder.isServer) { ClearThreadPane(); return; } if (showPerformance) { gBeforeFolderLoadTime = new Date(); } gCurrentLoadingFolderURI = uri; gNextMessageAfterDelete = null; // forget what message to select, if any if(msgfolder.manyHeadersToDownload()) { try { SetBusyCursor(window, true); gCurrentFolderToReroot = uri; gCurrentLoadingFolderIsThreaded = isThreaded; gCurrentLoadingFolderSortID = sortID; gCurrentLoadingFolderSortDirection = sortDirection; gCurrentLoadingFolderViewType = viewType; msgfolder.startFolderLoading(); msgfolder.updateFolder(msgWindow); } catch(ex) { dump("Error loading with many headers to download: " + ex + "\n"); } } else { SetBusyCursor(window, true); gCurrentFolderToReroot = ""; gCurrentLoadingFolderIsThreaded = false; gCurrentLoadingFolderSortID = ""; gCurrentLoadingFolderViewType = ""; RerootFolder(uri, msgfolder, isThreaded, sortID, sortDirection, viewType); //Need to do this after rerooting folder. Otherwise possibility of receiving folder loaded //notification before folder has actually changed. msgfolder.updateFolder(msgWindow); }} |
|
setTitleFromFolder(msgfolder); | setTitleFromFolder(msgfolder, null); | function ChangeFolderByURI(uri, isThreaded, sortID){ dump('In ChangeFolderByURI\n'); var resource = RDF.GetResource(uri); var msgfolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder); try { setTitleFromFolder(msgfolder); } catch (ex) { dump("error setting title: " + ex + "\n"); } gBeforeFolderLoadTime = new Date(); gCurrentLoadingFolderURI = uri; if(msgfolder.manyHeadersToDownload()) { try { gCurrentFolderToReroot = uri; gCurrentLoadingFolderIsThreaded = isThreaded; gCurrentLoadingFolderSortID = sortID; msgfolder.startFolderLoading(); msgfolder.updateFolder(msgWindow); } catch(ex) { dump("Error loading with many headers to download\n"); } } else { gCurrentFolderToReroot = ""; gCurrentLoadingFolderIsThreaded = false; gCurrentLoadingFolderSortID = ""; RerootFolder(uri, msgfolder, isThreaded, sortID); //Need to do this after rerooting folder. Otherwise possibility of receiving folder loaded //notification before folder has actually changed. msgfolder.updateFolder(msgWindow); }} |
try { if (!token.isLoggedIn()) { token.login(true); } window.open("changepassword.xul", selected_slot.tokenName, "chrome,width=300,height=350,resizable=0,modal=1,dialog=1"); showSlotInfo(); enableButtons(); } catch (e) { } | window.open("changepassword.xul", selected_slot.tokenName, "chrome,resizable=1,modal=1,dialog=1"); showSlotInfo(); enableButtons(); | function changePassword(){ getSelectedItem(); token = selected_slot.getToken(); try { // this seems to be neccessary, otherwise it fails in the PKCS#11 layer. // but it doesn't feel right... if (!token.isLoggedIn()) { token.login(true); } window.open("changepassword.xul", selected_slot.tokenName, "chrome,width=300,height=350,resizable=0,modal=1,dialog=1"); showSlotInfo(); enableButtons(); } catch (e) { }} |
token = selected_slot.getToken(); | function changePassword(){ getSelectedItem(); token = selected_slot.getToken(); window.open("changepassword.xul", selected_slot.tokenName, "chrome,resizable=1,modal=1,dialog=1"); showSlotInfo(); enableButtons();} |
|
var askEveryTimeHidden = document.getElementById("askEveryTimeHidden"); askEveryTimeHidden.setAttribute("checked",(radiogroup.value == 1)?"true":"false"); | function changePasswordSettings(){ var askTimes = 0; var timeout = internal_token.getAskPasswordTimeout(); var timeoutField = document.getElementById("passwordTimeout"); var radiogroup = document.getElementById("passwordAskTimes"); switch ( radiogroup.value ) { case "0": timeoutField.setAttribute("disabled", true); askTimes = nsIPK11Token.ASK_FIRST_TIME; break; case "1": timeoutField.setAttribute("disabled", true); askTimes = nsIPK11Token.ASK_EVERY_TIME; break; case "2": timeoutField.removeAttribute("disabled"); timeoutField.focus(); timeout = timeoutField.value; var re = new RegExp("^[0-9]+$"); if (!re.test(timeout)) { timeout = "1"; } askTimes = nsIPK11Token.ASK_EXPIRE_TIME; break; } internal_token.setAskPasswordDefaults(askTimes, timeout);} |
|
case "2": var timeoutField = document.getElementById("passwordTimeout"); | case "2": timeoutField.removeAttribute("disabled"); timeoutField.focus(); | function changePasswordSettings(){ var askTimes = 0; var timeout = internal_token.getAskPasswordTimeout(); var radiogroup = document.getElementById("passwordAskTimes"); switch ( radiogroup.value ) { case "0": askTimes = nsIPK11Token.ASK_FIRST_TIME; break; case "1": askTimes = nsIPK11Token.ASK_EVERY_TIME; break; case "2": var timeoutField = document.getElementById("passwordTimeout"); timeout = timeoutField.value; var re = new RegExp("^[0-9]+$"); if (!re.test(timeout)) { timeout = "0"; } askTimes = nsIPK11Token.ASK_EXPIRE_TIME; break; } internal_token.setAskPasswordDefaults(askTimes, timeout);} |
if (gSearchInput.value == "") | if (gSearchInput.value == "" || gSearchInput.showingSearchCriteria) { | function changeQuickSearchMode(aMenuItem){ viewDebug("changing quick search mode\n"); // extract the label and set the search input to match it var oldSearchMode = gSearchInput.searchMode; gSearchInput.searchMode = aMenuItem.value; if (gSearchInput.value == "") gSearchInput.showingSearchCriteria = true; else if (oldSearchMode != gSearchInput.searchMode) // the search mode just changed so we need to redo the quick search { if (gHighlightedMessageText) removeHighlighting(); // remove any existing highlighting in the message before switching gears onEnterInSearchBar(); }} |
viewDebug("changing quick search mode\n"); | function changeQuickSearchMode(aMenuItem){ // extract the label and set the search input to match it var oldSearchMode = gSearchInput.searchMode; gSearchInput.searchMode = aMenuItem.value; if (gSearchInput.value == "") gSearchInput.showingSearchCriteria = true; else if (oldSearchMode != gSearchInput.searchMode) // the search mode just changed so we need to redo the quick search { if (gHighlightedMessageText) removeHighlighting(); // remove any existing highlighting in the message before switching gears onEnterInSearchBar(); }} |
|
dialog.suggestedList.selectedIndex = -1; | dialog.SuggestedList.selectedIndex = -1; | function ChangeReplaceWord(){ // Unselect the word in the suggested list when user edits the replacement word dialog.suggestedList.selectedIndex = -1;} |
dialog.SuggestedList.clearItemSelection(); | dialog.SuggestedList.selectedIndex = -1; | function ChangeReplaceWord(){ // Calling this triggers SelectSuggestedWord(), // so temporarily suppress the effect of that var saveAllow = allowSelectWord; allowSelectWord = false; // Unselect the word in the suggested list when user edits the replacement word dialog.SuggestedList.clearItemSelection(); allowSelectWord = saveAllow;} |
PreviousReplaceWord = dialog.ReplaceWordInput.value; SetReplaceEnable(); | function ChangeReplaceWord(){ // Calling this triggers SelectSuggestedWord(), // so temporarily suppress the effect of that var saveAllow = allowSelectWord; allowSelectWord = false; // Unselect the word in the suggested list when user edits the replacement word dialog.SuggestedList.clearItemSelection(); allowSelectWord = saveAllow;} |
|
SetElementEnabledById("ok", gDialog.rowsInput.value.length > 0 && | var enable = gDialog.rowsInput.value.length > 0 && | function ChangeRowOrColumn(id){ // Allow only integers forceInteger(id); // Enable OK only if both rows and columns have a value > 0 SetElementEnabledById("ok", gDialog.rowsInput.value.length > 0 && gDialog.rowsInput.value > 0 && gDialog.columnsInput.value.length > 0 && gDialog.columnsInput.value > 0);} |
gDialog.columnsInput.value > 0); | gDialog.columnsInput.value > 0; SetElementEnabledById("ok", enable); SetElementEnabledById("AdvancedEditButton1", enable); | function ChangeRowOrColumn(id){ // Allow only integers forceInteger(id); // Enable OK only if both rows and columns have a value > 0 SetElementEnabledById("ok", gDialog.rowsInput.value.length > 0 && gDialog.rowsInput.value > 0 && gDialog.columnsInput.value.length > 0 && gDialog.columnsInput.value > 0);} |
var previousSelection = screenResolution.getElementsByAttribute("current", "true")[0]; | function changeScreenResolution() { var screenResolution = document.getElementById("screenResolution"); var userResolution = document.getElementById("userResolution"); if (screenResolution.value == "other") { // If the user selects "Other..." we bring up the calibrate screen dialog var rv = { newdpi : 0 }; calscreen = window.openDialog("chrome://communicator/content/pref/pref-calibrate-screen.xul", "_blank", "modal,chrome,centerscreen,resizable=no,titlebar", rv); if (rv.newdpi != -1) { // They have entered values, and we have a DPI value back var dpi = screenResolution.getAttribute( "dpi" ); setResolution ( rv.newdpi ); } else { // They've cancelled. We can't leave "Other..." selected, so... var defaultResolution = document.getElementById("defaultResolution"); screenResolution.selectedItem = defaultResolution; userResolution.setAttribute("hidden", "true"); } } else if (!(screenResolution.value == userResolution.value)) { // User has selected one of the hard-coded resolutions userResolution.setAttribute("hidden", "true"); } } |
|
var defaultResolution = document.getElementById("defaultResolution"); screenResolution.selectedItem = defaultResolution; userResolution.setAttribute("hidden", "true"); | screenResolution.selectedItem = previousSelection; | function changeScreenResolution() { var screenResolution = document.getElementById("screenResolution"); var userResolution = document.getElementById("userResolution"); if (screenResolution.value == "other") { // If the user selects "Other..." we bring up the calibrate screen dialog var rv = { newdpi : 0 }; calscreen = window.openDialog("chrome://communicator/content/pref/pref-calibrate-screen.xul", "_blank", "modal,chrome,centerscreen,resizable=no,titlebar", rv); if (rv.newdpi != -1) { // They have entered values, and we have a DPI value back var dpi = screenResolution.getAttribute( "dpi" ); setResolution ( rv.newdpi ); } else { // They've cancelled. We can't leave "Other..." selected, so... var defaultResolution = document.getElementById("defaultResolution"); screenResolution.selectedItem = defaultResolution; userResolution.setAttribute("hidden", "true"); } } else if (!(screenResolution.value == userResolution.value)) { // User has selected one of the hard-coded resolutions userResolution.setAttribute("hidden", "true"); } } |
previousSelection.removeAttribute("current"); screenResolution.selectedItem.setAttribute("current", "true"); | function changeScreenResolution() { var screenResolution = document.getElementById("screenResolution"); var userResolution = document.getElementById("userResolution"); if (screenResolution.value == "other") { // If the user selects "Other..." we bring up the calibrate screen dialog var rv = { newdpi : 0 }; calscreen = window.openDialog("chrome://communicator/content/pref/pref-calibrate-screen.xul", "_blank", "modal,chrome,centerscreen,resizable=no,titlebar", rv); if (rv.newdpi != -1) { // They have entered values, and we have a DPI value back var dpi = screenResolution.getAttribute( "dpi" ); setResolution ( rv.newdpi ); } else { // They've cancelled. We can't leave "Other..." selected, so... var defaultResolution = document.getElementById("defaultResolution"); screenResolution.selectedItem = defaultResolution; userResolution.setAttribute("hidden", "true"); } } else if (!(screenResolution.value == userResolution.value)) { // User has selected one of the hard-coded resolutions userResolution.setAttribute("hidden", "true"); } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.