Adding in the ability to delete remote calendars.

This commit is contained in:
mikep%oeone.com 2002-11-21 15:23:06 +00:00
Родитель e40541c78d
Коммит 50a9ff11fd
3 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -96,7 +96,7 @@
<command id="new_server_command" oncommand="gCalendarWindow.calendarManager.launchAddCalendarDialog()"/>
<command id="edit_server_command" oncommand="gCalendarWindow.calendarManager.launchEditCalendarDialog()"/>
<command id="delete_server_command" oncommand="deleteCalendar()" disabled="true" collapsed="true"/>
<command id="delete_server_command" oncommand="deleteCalendar()"/>
<command id="find_new_calendar_command" oncommand="goFindNewCalendars()"/>
<command id="next_command" oncommand="gCalendarWindow.currentView.goToNext()"/>

Просмотреть файл

@ -284,9 +284,6 @@ calendarManager.prototype.removeCalendar = function calMan_removeCalendar( ThisC
*/
calendarManager.prototype.deleteCalendar = function calMan_deleteCalendar( ThisCalendarObject )
{
//DISABLE DELETE FOR NOW
return;
if( ThisCalendarObject.getAttribute( "http://home.netscape.com/NC-rdf#serverNumber" ) == 0 )
return;

Просмотреть файл

@ -210,7 +210,7 @@ if(typeof(JS_LIB_LOADED)=='boolean')
if(this.isValid()) {
// FIXME: if we get this node from RDF, it has no parent...
// try just removing all arcs and targets...
// var parentres = this.RDF.GetResource(this.parent);
// var parentres = this.RDF.GetResource(this.parent);
// this.RDFC.Init(this.dsource, parentres);
var arcs = this.dsource.ArcLabelsOut(this.resource);
@ -222,8 +222,7 @@ if(typeof(JS_LIB_LOADED)=='boolean')
this.dsource.Unassert(this.resource, arc, target, true);
}
}
// this.RDFC.RemoveElement(this.resource, false);
this.RDFC.RemoveElement(this.resource, false); //removes the parent element
this.setValid(false);
} else {
jslibError(null, "RDFResource is no longer valid!\n", "NS_ERROR_UNEXPECTED",