зеркало из https://github.com/mozilla/pjs.git
Adding in the ability to delete remote calendars.
This commit is contained in:
Родитель
e40541c78d
Коммит
50a9ff11fd
|
@ -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",
|
||||
|
|
Загрузка…
Ссылка в новой задаче