contactsPane.js
function (thing, group) {
            var pname = kb.any(thing, ns.vcard('fn'))
            var gname = kb.any(group, ns.vcard('fn'))
            var groups = kb.each(null, ns.vcard('hasMember'), thing)
            if (groups.length < 2) {
              alert('Must be a member of at least one group.  Add to another group first.')
              return
            }
            var message = 'Remove ' + pname + ' from group ' + gname + '?'
            if (confirm(message)) {
              var del = [ $rdf.st(group, ns.vcard('hasMember'), thing, group.doc()),
                $rdf.st(thing, ns.vcard('fn'), pname, group.doc())]
              kb.updater.update(del, [], function (uri, ok, err) {
                if (!ok) return complain('Error removing member from group ' + group + ': ' + err)
                console.log('Removed ' + pname + ' from group ' + gname)
                syncGroupList()
              })
            }
          }
function (thing, group) {
            var pname = kb.any(thing, ns.vcard('fn'))
            var gname = kb.any(group, ns.vcard('fn'))
            var groups = kb.each(null, ns.vcard('hasMember'), thing)
            if (groups.length < 2) {
              alert('Must be a member of at least one group.  Add to another group first.')
              return
            }
            var message = 'Remove ' + pname + ' from group ' + gname + '?'
            if (confirm(message)) {
              var del = [ $rdf.st(group, ns.vcard('hasMember'), thing, group.doc()),
                $rdf.st(thing, ns.vcard('fn'), pname, group.doc())]
              kb.updater.update(del, [], function (uri, ok, err) {
                if (!ok) return complain('Error removing member from group ' + group + ': ' + err)
                console.log('Removed ' + pname + ' from group ' + gname)
                syncGroupList()
              })
            }
          }
function ( thing , group ) { var pname = kb . any ( thing , ns . vcard ( 'fn' ) ) var gname = kb . any ( group , ns . vcard ( 'fn' ) ) var groups = kb . each ( null , ns . vcard ( 'hasMember' ) , thing ) if ( groups . length < 2 ) { alert ( 'Must be a member of at least one group.  Add to another group first.' ) return } var message = 'Remove ' + pname + ' from group ' + gname + '?' if ( confirm ( message ) ) { var del = [ $rdf . st ( group , ns . vcard ( 'hasMember' ) , thing , group . doc ( ) ) , $rdf . st ( thing , ns . vcard ( 'fn' ) , pname , group . doc ( ) ) ] kb . updater . update ( del , [ ] , function ( uri , ok , err ) { if ( ! ok ) return complain ( 'Error removing member from group ' + group + ': ' + err ) console . log ( 'Removed ' + pname + ' from group ' + gname ) syncGroupList ( ) } ) } }
Remove a person from a group
Remove a person from a group