# HG changeset patch # User Drew Perttula # Date 1496306116 0 # Node ID 2713d2f7a0fcfaa3bb8aa603c7b8d745b4463c47 # Parent 8268224c1b23cc5b26fcf69c5a4bfe69665f2dd2 resource-display can have a rename button for editing rdfs:label Ignore-this: 99510987756065f9a30ffc2de0c4b6f4 diff -r 8268224c1b23 -r 2713d2f7a0fc light9/web/graph.coffee --- a/light9/web/graph.coffee Fri Jun 02 06:58:49 2017 +0000 +++ b/light9/web/graph.coffee Thu Jun 01 08:35:16 2017 +0000 @@ -192,7 +192,7 @@ @_autoDeps.graphChanged(patch) getObjectPatch: (s, p, newObject, g) -> - # send a patch which removes existing values for (s,p,*,c) and + # make a patch which removes existing values for (s,p,*,c) and # adds (s,p,newObject,c). Values in other graphs are not affected. existing = @graph.findByIRI(s, p, null, g) return { @@ -300,3 +300,9 @@ nextNumberedResource: (base) -> @nextNumberedResources(base, 1)[0] + contextsWithPattern: (s, p, o) -> + ctxs = [] + for q in @graph.find(s, p, o) + ctxs.push(q.graph) + return _.unique(ctxs) + diff -r 8268224c1b23 -r 2713d2f7a0fc light9/web/resource-display.html --- a/light9/web/resource-display.html Fri Jun 02 06:58:49 2017 +0000 +++ b/light9/web/resource-display.html Thu Jun 01 08:35:16 2017 +0000 @@ -1,11 +1,37 @@ + +