1

Resolved

Not able to delete an emptied group

description

after having emptied the list of portals belonging to a group and update, we have a button to delete a group, but it has no effect.

I've been able to workaround it by changing in serviceClient.js :
change delete (who seems to be reserved) by deleteGroup)
in line 28 : self.delete = function (groupId) {
to : self.deleteGroup = function (groupId) {

and in viewmodel.js (not sure about it but it seems to work)
i've replaced :
self.deletePortalGroup = function (group) {
    serviceClient.deleteGroup(group.PortalGroupId)
        .done(function () {
            ko.utils.arrayForEach(group.Portals(), function (portal) {
                self.AvailablePortals.push(portal);
            });
            self.AvailablePortals.push(group.MasterPortal());
            self.PortalGroups.remove(group);
        });
};
with (not sure about it but it seems to work)
self.deletePortalGroup = function (group) {
    serviceClient.deleteGroup(group.PortalGroupId);
    self.PortalGroups.remove(group);
};
Regards HTH

comments